package com.djt.book_system.dao;

import com.djt.book_system.entity.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Repository
@Mapper
public interface LoginDao {
    @Select("select * from users where account = #{uname}")
    Users selectUser(String uname);
    @Select("select aid from user_auth where uid = #{uid}")
    int selectAidByUid(int uid);
    @Insert("insert into book_system.logs(logtime, uid) values (now(), #{uid})")
    void loginLogs(int uid);
}
